The Java programming language is a popular programming language with a very large worldwide installed user base. One of its primary advantages is that Java can be used with most forms of computer hardware, from small embedded controllers, mobile phones, and laptops, to larger desktop workstations, web servers, and even supercomputers. Generally, a Java program is compiled using a java compiler (javac) into bytecode. This bytecode is then executed by a Java Virtual Machine (JVM) running atop the computer or other hardware. This allows the original Java program to be run unmodified in different hardware environments.
However, despite its widespread usage, Java lacks some programming language features that are part of many other programming languages, including, for example, the availability of function types. In other programming languages, function types can be used to reference functions without knowing exactly which function is referenced. However, since Java lacks function types, a Java programmer has to provide a workaround, typically by creating interfaces with a single method to simulate function types. These are the general areas that embodiments of the present invention are intended to address.